What is the getChar function of string in Java